<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>九九乘法表 - 带奇数行效果</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 20px;
            background-color: #f9f9f9;
        }

        h1 {
            color: #333;
            margin-bottom: 20px;
        }

        .multiplication-table {
            width: 80%;
            max-width: 600px;
        }

        .row {
            display: flex;
            flex-wrap: wrap;
            padding: 8px 0;
        }

        .odd-row {
            background-color: #DDDDDD;
            font-weight: bold;
            border-radius: 4px;
        }

        .item {
            padding: 5px 10px;
            margin: 2px;
            min-width: 60px;
        }
    </style>
</head>
<body>
    <h1>九九乘法表</h1>
    <div class="multiplication-table" id="multiplicationTable"></div>

    <script>
        document.addEventListener('DOMContentLoaded', function() {
            const table = document.getElementById('multiplicationTable');

            for (let i = 1; i <= 9; i++) {
                const row = document.createElement('div');
                row.className = 'row';

                // 奇数行添加特殊样式
                if (i % 2 === 1) {
                    row.classList.add('odd-row');
                }

                for (let j = 1; j <= i; j++) {
                    const item = document.createElement('span');
                    item.className = 'item';
                    item.textContent = `${j}*${i}=${i*j}`;
                    row.appendChild(item);
                }

                table.appendChild(row);
            }
        });
    </script>
</body>
</html>